package com.chencq.core.utils.encrypt;

/**
 * 解析JTV_CONN的加密口令.
 * <p>
 * 
 */
public class ParsePassWord {
	public static String getValue(String pwd) {
		int i, mod;
		String mid;
		String result = "";

		for (i = 1; i <= pwd.length() / 4; i++) {
			mid = pwd.substring(i * 4 - 3, (i * 4 - 3) + 3);
			mod = (i * i * i * i + 2001) % 48;
			result = result + (char) ((new Integer(mid).intValue() + mod));
		}

		return result;
	}

	public static void main(String[] args) {
		System.out.println(getValue("K054L064M050"));
	}

}
